<?
class CForm
{
	public function ShowField($arParams = NULL)
	{
		if(is_array($arParams))
		{
			$VALUE = $arParams['VALUE'] ? $arParams['VALUE'] : $arParams['VALUE_DEFAULT'];
			$JS_HIDE_VALUE_DEFAULT = ' onfocus="if (this.value == \''.$arParams['VALUE_DEFAULT'].'\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \''.$arParams['VALUE_DEFAULT'].'\' ;}"';
			
			switch ($arParams['TYPE'])
			{
				case 'TEXT':
					echo '<input type="text" name="'.$arParams['NAME'].'" size="'.$arParams['SIZE'].'" value="'.$VALUE.'" class="'.$arParams['CLASS'].'" id="'.$arParams['ID'].'" title="'.$arParams['TITLE'].'" '.$JS_HIDE_VALUE_DEFAULT.' />';
					break;
				case 'PASSWORD':
					echo '<input type="password" name="'.$arParams['NAME'].'" size="'.$arParams['SIZE'].'" value="" claass="'.$arParams['CLASS'].'" id="'.$arParams['ID'].'" />';
					break;
				case 'SELECT';
					echo '<select name="">';
					echo '<option value="1" checked="checked">one</option>';
					echo '<option value="2">two</option>';
					echo '</select>';
					break;
				default:
					break;
			}
		}
		return false;
	}
	
}